/*============================================
 * filename :   UriFormat
 * author   :   tangfan
 * date     :   2018/8/14
 * desc     :
 * version  :   1.0.0
 * Copyright (c) 2018-Junbo www.gzjunbo.net
==============================================*/

package com.baiyue.utils;

import com.fasterxml.jackson.annotation.JsonAnySetter;

/**
 * @author tangfan
 */
public class UriFormat {
    private StringBuilder builder = new StringBuilder();

    @JsonAnySetter
    public void addToUri(String name, Object property) {
        if (builder.length() > 0) {
            builder.append("&");
        }
        builder.append(name).append("=").append(property);
    }

    @Override
    public String toString() {
        return builder.toString();
    }
}
